Skip to content

fix(pm-stack): reject duplicate export options - #8901

Merged
dezren39 merged 1 commit into
mainfrom
queue/15100-8899-reject-duplicate-options
Nov 14, 2026
Merged

dezren39 merged 1 commit into
mainfrom
queue/15100-8899-reject-duplicate-options

Conversation

@dezren39

@dezren39 dezren39 commented Nov 12, 2026 •

Copy link
Copy Markdown
Member

Summary

  • Reject repeated scalar value options before probing stores or writing exports.
  • Suppress failure-document writes on duplicate options, so conflicting --out-dir values leave neither destination touched.
  • Add regression coverage for all four scalar options and preserve existing single-use controls.

Verification

  • node --test pm-stack/opencode-usage-export/opencode-usage-export.test.mjs (18 passed)
  • git diff --check

Closes #8899


Autofix with [code]smith
Open in [code]smith · Need help on this PR? Tag @codesmith-bot with what you need.

@dezren39
dezren39 requested a review from a team as a code owner November 12, 2026 09:45
@coderabbitai

coderabbitai Bot commented Nov 12, 2026

Copy link
Copy Markdown

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 59 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: c79234fc-eb5f-4354-a7a7-00bef4d0ddc0
Commits

Reviewing files that changed from the base of the PR and between 8938490 and 23133f1.

Files selected for processing: 2

  • pm-stack/opencode-usage-export/opencode-usage-export.mjs
  • pm-stack/opencode-usage-export/opencode-usage-export.test.mjs
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 12, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-12T09:49:01.545353Z 23133f1 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@dezren39

Copy link
Copy Markdown
Member Author

🤖 Agent note · done

  • Agent: repo-worker-code / any-n
  • State: pr-opened
  • Task: queue task 15100 completed with outcome pr_opened.
  • Verification: focused suite 18/18 passed; CI pending.

@dezren39

Copy link
Copy Markdown
Member Author

Agent note — task 17201 shepherding PR #8901 to merge (lane any-d)

  • state: verified — merging on merits
  • task: 17201 (pr_shepherd, 90-day review open-PR pass), lane assignment: direct
  • fresh verification (2026-11-14T20:06Z): PR OPEN at packet head 23133f1, no labels (no held / user/owned / do-not-merge / do-not-auto-edit), MERGEABLE; the fix is NOT on main (no duplicate-option rejection in main's opencode-usage-export.mjs); issue pm-stack(opencode-usage-export): reject duplicate value options instead of silently retargeting output #8899 OPEN (status:in-review — this PR is its fix)
  • diff read in full: parseArgs rejects a repeated scalar option (--db / --out-dir / --window-hours / --fresh-hours) with ExportError invalid-argument (exit 2) before probing or writing, and suppresses the failure document so neither conflicting --out-dir destination is touched; regression test covers all four options and asserts no output was written anywhere
  • tests run by this lane at the head (worktree of 23133f1): node --test pm-stack/opencode-usage-export/opencode-usage-export.test.mjs — 18/18 pass
  • Codex review: completed, no findings (has_any_findings: false). CodeRabbit rate-limited, no actionable comments.
  • checks: 9 success / 10 failure. The pm-stack-adjacent leg (aggregator + projector + dispatch + python suites + quota exporters) fails in the installer CLI argument validation tests (job 131101219121 log) — a different component this diff does not touch; the exporter suite this PR changes passes at the head (above). The remaining failures are the baseline mcpx/fleet-search legs failing identically on unrelated heads. Per the standing merge authority, these do not block a verified fix.

@dezren39
dezren39 merged commit 0d1882d into main Nov 14, 2026
11 of 21 checks passed
@dezren39
dezren39 deleted the queue/15100-8899-reject-duplicate-options branch November 14, 2026 20:07
@dezren39

Copy link
Copy Markdown
Member Author

Agent note — task 17201 DONE: PR #8901 merged on merits

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

pm-stack(opencode-usage-export): reject duplicate value options instead of silently retargeting output

1 participant